﻿/*
* 作者:haojielyb
* 邮箱:haojielyb@qq.com
*/

using demo.Core;
using Furion.DatabaseAccessor;
using Furion.DynamicApiController;
using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo.Application
{
    public class DemoService : IDynamicApiController
    {

        private readonly MyInfoOptions options1;
        private readonly MyInfoOptions options2;
        private readonly MyInfoOptions options3;
        public DemoService(IOptions<MyInfoOptions> options
          , IOptionsSnapshot<MyInfoOptions> optionsSnapshot
          , IOptionsMonitor<MyInfoOptions> optionsMonitor)
        {
            options1 = options.Value;
            options2 = optionsSnapshot.Value;
            options3 = optionsMonitor.CurrentValue;

        }

        public IList<MyInfoOptions> GetOpt()
        {
         

            return new MyInfoOptions[] { options1,options2,options3};
        }


    }
}